package com.chuyi.demo.frame;

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JRadioButton;
import javax.swing.JToggleButton;

import com.chuyi.demo.util.WindowUtilities;

public class TestJF {
	
	public static void main(String[] args) {
		
		WindowUtilities.setNativeLookAndFeel();//界面外观
		
		/*try {
			UIManager.setLookAndFeel("");
		} catch (Exception e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} */
		
		JFrame jframe = new JFrame();
		jframe.setSize(400, 200);
		Container container =  jframe.getContentPane();
		container.setLayout(new FlowLayout());
		container.add(new JButton("button1"));
		container.add(new JButton("button2"));
		container.add(new JButton("button3"));
		
		
		
		
		container.add(new JCheckBox("chec1",true));
		
		
		container.add(new JRadioButton("radio1"));
		
		container.add(new JToggleButton("togg"));
		
		jframe.setVisible(true);
		jframe.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});
		
	}
	

}
